package com.factory;

import com.ktjy.dao.impl.VocalConcertMethodInterceptor;
import net.sf.cglib.proxy.Enhancer;

public class VocalConcertFactory {
    private static VocalConcertMethodInterceptor vocalConcertMethodInterceptor=new VocalConcertMethodInterceptor();
    public static <T> T create(Class<T> target){
        Enhancer  enhancer=new Enhancer();
        enhancer.setCallback(vocalConcertMethodInterceptor);
        enhancer.setSuperclass(target);
        return (T)enhancer.create();
    }
}